'use strict';

const { Controller } = require('ee-core');
const Log = require('ee-core/log');
const { resOk } = require("../utils/tools");
const Services = require('ee-core/services');

class FileController extends Controller {
	constructor (props) {
		super(props);

	}

	// 读取本地文件
	async readFile (path) {
		let res = await Services.get('file').readFile(path);
		Log.info('File reading', path);
		return resOk(res)
	}

}


FileController.toString = () => '[class FileController]';
module.exports = FileController;
